package br.com.fpu.everton.northwind.utils.database.keys;

import br.com.fpu.everton.northwind.utils.beans.BaseBean;

public class OrderDetailKeyBean extends BaseBean {

	private static final long serialVersionUID = 3306153454146037073L;

	private int orderId;

	private int productId;

	public int getOrderId() {
		return this.orderId;
	}

	public void setOrderId(int orderId) {
		this.orderId = orderId;
	}

	public int getProductId() {
		return this.productId;
	}

	public void setProductId(int productId) {
		this.productId = productId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;

		result = prime * result + this.orderId;
		result = prime * result + this.productId;

		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;

		if (!super.equals(obj))
			return false;

		if (getClass() != obj.getClass())
			return false;

		OrderDetailKeyBean other = (OrderDetailKeyBean) obj;

		if (this.orderId != other.orderId)
			return false;

		if (this.productId != other.productId)
			return false;

		return true;
	}

}
